// cSpell: words shixun codepen signup
import React from 'react'
import { Menu } from 'semantic-ui-react'

export default class MenuItems extends React.Component {
    render () {
        return (
            <div>
                {this.props.menus.map((item, index) => {
                    let type = ""
                    if (item.type === "video") {
                        type = 'video play '
                    } else if (item.type === "shixun") {
                        type = 'codepen '
                    } else {
                        type = 'signup '
                    }
                    return <Menu.Item key={index} name={item.title} active={this.props.activeItem === item.title} onClick={this.props.menuItemClick} className='menu-item'>
                                <i className={type + 'icon menu-item-icon'}/>
                                {item.title}
                            </Menu.Item>
                })}
            </div>
        )
    }
}
